
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type LuckPrizeRequest struct {

	Type string `json:"type" form:"type"`

	LotteryId string `json:"lottery_id" form:"lottery_id"`

	Name string `json:"name" form:"name"`

	Prompt string `json:"prompt" form:"prompt"`

	Image string `json:"image" form:"image"`

	Chance string `json:"chance" form:"chance"`

	Total string `json:"total" form:"total"`

	CouponId string `json:"coupon_id" form:"coupon_id"`

	ProductId string `json:"product_id" form:"product_id"`

	Unique string `json:"unique" form:"unique"`

	Num string `json:"num" form:"num"`

	Sort string `json:"sort" form:"sort"`

	Status string `json:"status" form:"status"`

	IsDel string `json:"is_del" form:"is_del"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *LuckPrizeRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *LuckPrizeRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"type": "required",

		"lottery_id": "required",

		"name": "required",

		"prompt": "required",

		"image": "required",

		"chance": "required",

		"total": "required",

		"coupon_id": "required",

		"product_id": "required",

		"unique": "required",

		"num": "required",

		"sort": "required",

		"status": "required",

		"is_del": "required",

		"add_time": "required",

	}
}

func (r *LuckPrizeRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *LuckPrizeRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *LuckPrizeRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
